home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / DDE.H < prev    next >
C/C++ Source or Header  |  1995-08-14  |  5KB  |  153 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * dde.h -       Dynamic Data Exchange structures and definitions              *
  4. *                                                                             *
  5. \*****************************************************************************/
  6.  
  7. #ifndef __DDE_H         /* prevent multiple includes */
  8. #define __DDE_H
  9.  
  10. #ifndef __WINDOWS_H
  11. #include <windows.h>    /* <windows.h> must be included */
  12. #endif  /* __WINDOWS_H */
  13.  
  14. #ifndef RC_INVOKED
  15. #pragma pack(1)
  16. //#pragma option -a-      /* Assume byte packing throughout */
  17. //#pragma warning -bbf       /* Turn off warning about bitfields */
  18. #endif  /* RC_INVOKED */
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {            /* Assume C declarations for C++ */
  22. #endif  /* __cplusplus */
  23.  
  24. /* DDE window messages */
  25.  
  26. #define WM_DDE_FIRST        0x03E0
  27. #define WM_DDE_INITIATE     (WM_DDE_FIRST)
  28. #define WM_DDE_TERMINATE    (WM_DDE_FIRST+1)
  29. #define WM_DDE_ADVISE       (WM_DDE_FIRST+2)
  30. #define WM_DDE_UNADVISE     (WM_DDE_FIRST+3)
  31. #define WM_DDE_ACK          (WM_DDE_FIRST+4)
  32. #define WM_DDE_DATA         (WM_DDE_FIRST+5)
  33. #define WM_DDE_REQUEST      (WM_DDE_FIRST+6)
  34. #define WM_DDE_POKE         (WM_DDE_FIRST+7)
  35. #define WM_DDE_EXECUTE      (WM_DDE_FIRST+8)
  36. #define WM_DDE_LAST         (WM_DDE_FIRST+8)
  37.  
  38. /****************************************************************************\
  39. *       DDEACK structure
  40. *
  41. *       Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
  42. *       sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
  43. *       WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
  44. *
  45. \****************************************************************************/
  46.  
  47. typedef struct tagDDEACK
  48. {
  49.     WORD    bAppReturnCode:8,
  50.             reserved:6,
  51.             fBusy:1,
  52.             fAck:1;
  53. } DDEACK;
  54.  
  55. /****************************************************************************\
  56. *       DDEADVISE structure
  57. *
  58. *       WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  59. *
  60. \****************************************************************************/
  61.  
  62. typedef struct tagDDEADVISE
  63. {
  64.     WORD    reserved:14,
  65.             fDeferUpd:1,
  66.             fAckReq:1;
  67.     short   cfFormat;
  68. } DDEADVISE;
  69.  
  70. /****************************************************************************\
  71. *       DDEDATA structure
  72. *
  73. *       WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
  74. *       The actual size of this structure depends on the size of
  75. *       the Value array.
  76. *
  77. \****************************************************************************/
  78.  
  79. typedef struct tagDDEDATA
  80. {
  81.     WORD    unused:12,
  82.             fResponse:1,
  83.             fRelease:1,
  84.             reserved:1,
  85.             fAckReq:1;
  86.     short   cfFormat;
  87.     BYTE     Value[1];
  88. } DDEDATA;
  89.  
  90.  
  91. /****************************************************************************\
  92. *       DDEPOKE structure
  93. *
  94. *       WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  95. *       The actual size of this structure depends on the size of
  96. *       the Value array.
  97. *
  98. \****************************************************************************/
  99.  
  100. typedef struct tagDDEPOKE
  101. {
  102.     WORD    unused:13,  /* Earlier versions of DDE.H incorrectly */
  103.                         /* 12 unused bits.                       */
  104.             fRelease:1,
  105.             fReserved:2;
  106.     short   cfFormat;
  107.     BYTE    Value[1];   /* This member was named rgb[1] in previous */
  108.                         /* versions of DDE.H                        */
  109.  
  110. } DDEPOKE;
  111.  
  112. /****************************************************************************\
  113. * The following typedef's were used in previous versions of the Windows SDK.
  114. * They are still valid.  The above typedef's define exactly the same structures
  115. * as those below.  The above typedef names are recommended, however, as they
  116. * are more meaningful.
  117. *
  118. * Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  119. * not correctly define the bit positions.
  120. \****************************************************************************/
  121.  
  122. typedef struct tagDDELN
  123. {
  124.     WORD    unused:13,
  125.             fRelease:1,
  126.             fDeferUpd:1,
  127.             fAckReq:1;
  128.     short   cfFormat;
  129. } DDELN;
  130.  
  131. typedef struct tagDDEUP
  132. {
  133.     WORD    unused:12,
  134.             fAck:1,
  135.             fRelease:1,
  136.             fReserved:1,
  137.             fAckReq:1;
  138.     short   cfFormat;
  139.     BYTE    rgb[1];
  140. } DDEUP;
  141.  
  142. #ifdef __cplusplus
  143. }                       /* End of extern "C" { */
  144. #endif  /* __cplusplus */
  145.  
  146. #ifndef RC_INVOKED
  147. #pragma pack ()
  148. //#pragma option -a.      /* Revert to default packing  out to get to compile*/
  149. //#pragma warn .bbf       /* Revert to default warning about bitfields */
  150. #endif  /* RC_INVOKED */
  151.  
  152. #endif  /* __DDE_H */
  153.